void setup ()
{
  delay (1000);
  
  Serial.begin(9600);
  Serial3.begin(9600);
}

void loop ()
{
  if (Serial.available())
  {
    char c = Serial.read();
    
    if (c == '%')
    {
      Serial3.write(26); 
    }
    else
    {
      Serial3.write(c);
    }
  }
  
  if (Serial3.available())
  {
    char c = Serial3.read();
        
    if (c == '\r')
    {
      Serial.write("[CR]");
    }
    else if (c == '\n')
    {
      Serial.write("[LF]");
      Serial.write("\r\n");
    }
    else
    {
      Serial.write(c);
    }
  }
}

